home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / VISUALBA / GTTBAR01.ZIP / FORM1.FRM < prev    next >
Text File  |  1993-11-29  |  7KB  |  238 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00FFFFFF&
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   2925
  6.    ClientLeft      =   2055
  7.    ClientTop       =   2955
  8.    ClientWidth     =   5850
  9.    Height          =   3615
  10.    Left            =   1995
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   195
  13.    ScaleMode       =   3  'Pixel
  14.    ScaleWidth      =   390
  15.    Top             =   2325
  16.    Width           =   5970
  17.    Begin TextBox Text1 
  18.       FontBold        =   0   'False
  19.       FontItalic      =   0   'False
  20.       FontName        =   "MS Sans Serif"
  21.       FontSize        =   9.75
  22.       FontStrikethru  =   0   'False
  23.       FontUnderline   =   0   'False
  24.       Height          =   360
  25.       Left            =   615
  26.       TabIndex        =   0
  27.       Top             =   660
  28.       Width           =   2805
  29.    End
  30.    Begin gtpnl pnl2 
  31.       Align           =   2  'Align Bottom
  32.       BackColor       =   &H00C0C0C0&
  33.       BorderStyle     =   3  '3D Raised
  34.       Caption         =   ""
  35.       Height          =   390
  36.       Left            =   0
  37.       Top             =   2535
  38.       Width           =   5850
  39.       Begin gtpnl pnl3 
  40.          BackColor       =   &H00C0C0C0&
  41.          BorderStyle     =   4  '3D Recessed
  42.          Caption         =   ""
  43.          FontBold        =   0   'False
  44.          FontItalic      =   0   'False
  45.          FontName        =   "MS Sans Serif"
  46.          FontSize        =   9.75
  47.          FontStrikethru  =   0   'False
  48.          FontUnderline   =   0   'False
  49.          ForeColor       =   &H00000080&
  50.          Height          =   300
  51.          Left            =   135
  52.          Top             =   30
  53.          Width           =   5535
  54.       End
  55.    End
  56.    Begin gtpnl pnl1 
  57.       Align           =   1  'Align Top
  58.       BackColor       =   &H00C0C0C0&
  59.       BorderStyle     =   3  '3D Raised
  60.       Caption         =   ""
  61.       Flags3D         =   10
  62.       Height          =   435
  63.       Left            =   0
  64.       Top             =   0
  65.       Width           =   5850
  66.       Begin CommandButton cmd 
  67.          Caption         =   "Toggle"
  68.          Height          =   345
  69.          Index           =   0
  70.          Left            =   3585
  71.          TabIndex        =   1
  72.          Top             =   30
  73.          Width           =   1095
  74.       End
  75.       Begin tBar tBar 
  76.          Height          =   345
  77.          Index           =   4
  78.          Left            =   1860
  79.          Offset          =   5
  80.          Tag             =   "Print preview"
  81.          Top             =   30
  82.          Width           =   390
  83.       End
  84.       Begin tBar tBar 
  85.          Height          =   345
  86.          Index           =   3
  87.          Left            =   1350
  88.          Offset          =   4
  89.          Tag             =   "Print current document"
  90.          Top             =   30
  91.          Width           =   390
  92.       End
  93.       Begin tBar tBar 
  94.          Height          =   345
  95.          Index           =   2
  96.          Left            =   975
  97.          Offset          =   3
  98.          Tag             =   "Save current document"
  99.          Top             =   30
  100.          Width           =   390
  101.       End
  102.       Begin tBar tBar 
  103.          Height          =   345
  104.          Index           =   0
  105.          Left            =   105
  106.          Offset          =   1
  107.          Tag             =   "Create a new document"
  108.          Top             =   30
  109.          Width           =   390
  110.       End
  111.       Begin tBar tBar 
  112.          Height          =   345
  113.          Index           =   1
  114.          Left            =   480
  115.          Offset          =   2
  116.          Tag             =   "Open a saved document"
  117.          Top             =   30
  118.          Width           =   390
  119.       End
  120.       Begin tBar tBar 
  121.          Height          =   345
  122.          Index           =   5
  123.          Left            =   2235
  124.          Offset          =   6
  125.          Tag             =   "Cut selection to clipboard"
  126.          Top             =   30
  127.          Width           =   390
  128.       End
  129.       Begin tBar tBar 
  130.          Height          =   345
  131.          Index           =   6
  132.          Left            =   2610
  133.          Offset          =   7
  134.          Tag             =   "Paste clipboard data"
  135.          Top             =   30
  136.          Width           =   390
  137.       End
  138.       Begin tBar tBar 
  139.          Height          =   345
  140.          Index           =   7
  141.          Left            =   2985
  142.          Offset          =   15
  143.          Tag             =   "Quit program"
  144.          Top             =   30
  145.          Width           =   390
  146.       End
  147.    End
  148.    Begin tBar tBar 
  149.       Height          =   330
  150.       Index           =   8
  151.       Left            =   150
  152.       Offset          =   19
  153.       Tag             =   "Bring up dialog box"
  154.       Top             =   675
  155.       Width           =   375
  156.    End
  157.    Begin Menu mnuMn 
  158.       Caption         =   "&File"
  159.       Index           =   0
  160.       Begin Menu mnuFile 
  161.          Caption         =   "&ToolBar"
  162.          Checked         =   -1  'True
  163.          Index           =   0
  164.          Shortcut        =   ^T
  165.       End
  166.       Begin Menu mnuFile 
  167.          Caption         =   "&Status Bar"
  168.          Checked         =   -1  'True
  169.          Index           =   1
  170.          Shortcut        =   ^S
  171.       End
  172.       Begin Menu mnuFile 
  173.          Caption         =   "E&xit"
  174.          Index           =   2
  175.          Shortcut        =   ^X
  176.       End
  177.    End
  178. End
  179.  
  180.    DefInt A-Z
  181.  
  182.    Const DR3LEFT = &H1
  183.    Const DR3TOP = &H2
  184.    Const DR3RIGHT = &H4
  185.    Const DR3BOT = &H8
  186.    Const DR3ALL = &HF
  187.  
  188. Sub cmd_Click (Index As Integer)
  189.    
  190.    If Index = 0 Then
  191.       For x = 0 To 7
  192.          tbar(x).Enabled = Not tbar(x).Enabled
  193.       Next
  194.    End If
  195.  
  196. End Sub
  197.  
  198. Sub mnuFile_Click (Index As Integer)
  199.    
  200.    Select Case Index
  201.       Case 0:
  202.          mnuFile(Index).Checked = Not mnuFile(Index).Checked
  203.          pnl1.Visible = mnuFile(Index).Checked
  204.       
  205.       Case 1:
  206.          mnuFile(Index).Checked = Not mnuFile(Index).Checked
  207.          pnl2.Visible = mnuFile(Index).Checked
  208.       
  209.       Case 2:
  210.          Unload Me
  211.    
  212.    End Select
  213.  
  214. End Sub
  215.  
  216. Sub pnl2_Resize ()
  217.    pnl3.Width = (((Me.ScaleWidth - 2) * screen.TwipsPerPixelX) - (pnl3.Left * 2))
  218. End Sub
  219.  
  220. Sub tBar_Click (Index As Integer)
  221.    
  222.    If Index = 7 Then
  223.       Unload Me
  224.       Exit Sub
  225.       End If
  226.    
  227.    Beep
  228.    MsgBox "You clicked toolbar no. " & Index, 64, "GT ToolBar"
  229.  
  230. End Sub
  231.  
  232. Sub tbar_MouseOver (Index As Integer)
  233.    
  234.    pnl3.Caption = " " & tbar(Index).Tag
  235.    
  236. End Sub
  237.  
  238.